package com.heima.wemedia.util;

import com.heima.model.wemedia.pojos.WmUser;

public class WmThreadLocal {
    private static ThreadLocal<WmUser> threadLocal = new ThreadLocal<>();
    private WmThreadLocal(){

    }

    public static void setUser(WmUser wmUser){
        threadLocal.set(wmUser);
    }

    public static WmUser getUser(){
        return threadLocal.get();
    }

    public static void clear(){
        threadLocal.remove();
    }
}
